package net.mgsx.product.t2m.modisco.utility;
import net.mgsx.product.t2m.modisco.tools.ModiscoUtils;

import org.eclipse.gmt.modisco.java.ASTNode;
import org.eclipse.gmt.modisco.infra.query.core.exception.ModelQueryExecutionException;
import org.eclipse.gmt.modisco.infra.query.core.java.IJavaModelQuery;
import org.eclipse.gmt.modisco.infra.query.core.java.ParameterValueList;

public class GetNbSubObjects implements IJavaModelQuery<ASTNode, Integer> {
	public Integer evaluate(final ASTNode context, final ParameterValueList parameterValues)
			throws ModelQueryExecutionException {
		return ModiscoUtils.getElements(context, ASTNode.class).size();
	}
}
